Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Expanding button"
Bootstrap 4.1.1 Snippet by
ALIMUL AL RAZY
4.1.1
Preview
HTML
CSS
View Full Screen
Fork
Fork this
2.8K
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <script type="text/javascript" src="//use.typekit.net/rym7bcj.js"></script> <script type="text/javascript">try{Typekit.load();}catch(e){}</script> <div class="container"> <h1>Simple Expanding Effect</h1> <a href="javascript:void(0);" class="button">Check it out</a><a href="javascript:void(0);" class="button-readmore"><span>Case Study</span></a> </div>
html, body { height: 100%; overflow: hidden; } body { background-color: #202024; font-family: "freight-sans-pro"; font-weight: 300; color: #eee; height: 100%; font-size: 1.4em; } .container { width: 60%; margin: auto; padding-top: 10%; height: 60%; } h1 { margin-bottom: 15px; } .button { position: relative; display: inline-block; color: #202024; text-decoration: none; text-transform: uppercase; background-color: rgba(255,255,255,0.3); border-radius: 300px; padding: 8px 24px 8px 24px; transition: all 0.25s; vertical-align: top; margin-right: 10px; } .button:hover { background-color: rgba(255,255,255,0.6); } .button-readmore { display: inline-block; background-color:rgba(0,0,0,0.3); text-decoration: none; border-radius: 300px; border: 1px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.3); height: 44px; width: 44px; position: relative; text-transform: uppercase; overflow: hidden; transition: all 0.35s; } .button-readmore:hover { width: 159px; border: 1px solid #fff; color: #fff; } .button-readmore span { position: absolute; display: inline-block; top: 0; left: 37px; width: 159px; height: 44px; line-height: 44px; text-align: center; transition: left 0.25s; } .button-readmore:hover span { left: 0; } .button-readmore:before { position: absolute; top: 0; left: 0; content:"..."; display: block; height: 44px; width: 44px; font-weight: 600; font-size: 24px; text-align: center; transition: left 0.35s; } .button-readmore:hover:before { left: -37px; }
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76